import java.util.Scanner;

public class Register {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int count = 0;
        String str1 = "123456";
        while(true){
            count++;
            String str2 = scanner.nextLine();
            //字符串比较方法
            if(str1.compareTo(str2) == 0){
                System.out.println("登录成功");
                break;
            }else if(count < 3){
                System.out.println("密码错误");
            }else{
                System.out.println("退出程序");
                break;
            }
        }
    }
}
